package top.gaui.nurse.jjwt;

import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;

import java.util.Date;

/**
 * @author Fujie_Zeng
 * @version 1.0
 * @date 2020/4/11 10:31
 */
public class CreateJwtTest {
    public static void main(String[] args){
        JwtBuilder jwtBuilder=Jwts.builder().setId("88").setSubject("yyy")
                .setIssuedAt(new Date())
                .signWith(SignatureAlgorithm.HS256,"nurse");
        String token = jwtBuilder.compact();
        System.out.println(token);
    }
}
